package com.java_senior_4;

import java.util.Iterator;
import java.util.LinkedList;

public class QQ {



    public static void main(String[] args) {
        String[] strs=new String[]{"1","1","2","2","3","3","4"};
        LinkedList<String> list=new LinkedList<>();

        for (int i = 0; i <strs.length; i++) {
            //声明标记，是否重复
            boolean isRepeat = true;
            for (int j = i+1; j < strs.length; j++) {
                if (strs[i].equals(strs[j])){
                    isRepeat = false;
                    break;
                }

            }

            if(isRepeat){
                list.add(strs[i]);
            }

        }
        Iterator iterator=list.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }


    }

}
